Carbon


FSCreateDirectoryUnicode

Header: Files.h Carbon status: Supported

Creates a new directory (folder) inside the specified parent directory.

OSErr FSCreateDirectoryUnicode (
    const FSRef *parentRef, 
    UniCharCount nameLength, 
    const UniChar *name, 
    FSCatalogInfoBitmap whichInfo, 
    const FSCatalogInfo *catalogInfo, 
    FSRef *newRef, 
    FSSpec *newSpec, 
    UInt32 *newDirID
);
parentRef

A pointer to the parent directory where the new directory is to be created.

nameLength

The length of the directory's name, in Unicode characters.

name

A pointer to the Unicode name of the new directory.

whichInfo

You may optionally specify which catalog info fields to set in this parameter.

catalogInfo

You may optionally specify a pointer to a FSCatalogInfo structure, with the values for catalog info fields to set. This parameter may be NULL.

newRef

On return, a pointer to the FSRef for the directory. This parameter is optional and you may set it to NULL.

newSpec

On return, a pointer to the FSSpec for the directory. This parameter is optional and you may set it to NULL.

newDirID

On return, a pointer to the directory ID of the directory.

function result

A result code.

DISCUSSION

You may optionally set catalog information for the new directory using the whichInfo and catalogInfo parameters; this is equivalent to calling FSSetCatalogInfo after creating the directory. If possible, you should set the textEncodingHint in the catalogInfo.

AVAILABILITY

Supported in Carbon. Available in Mac OS 9, and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)